from django.shortcuts import get_object_or_404, render_to_response
from django.http import HttpResponseRedirect, Http404, HttpResponse, HttpResponseNotFound
from django.template import RequestContext

from django.contrib.auth.models import User

from profiles.models import Profile

from assets.models import Asset

def profile(request, user_id):
  profile = get_object_or_404(User, id=user_id).profile
  favorites = Asset.objects.with_favorite_for(profile.user, False)
  return render_to_response('profile.html', locals(), context_instance=RequestContext(request))

def user_profile(request):
  profile = get_object_or_404(User, id=request.user.id).profile
  favorites = Asset.objects.with_favorite_for(request.user, False)
  return render_to_response('profile.html', locals(), context_instance=RequestContext(request))
